package IO;

import java.io.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86185
 * Date: 2023-08-02
 * Time: 17:32
 */
public class Demo3 {
    public static void main(String[] args) throws IOException {
        File file = new File("text.txt");
        System.out.println(file.exists());
        //等到程序结束前再删除
        file.deleteOnExit();
        System.out.println(file.exists());
    }
}
